<!DOCTYPE html>
<html>
<head>
<script>
  if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
  }

  if (window.internals) {
    addEventListener("load", function() {
      var poster = internals.getImageSourceURL(document.getElementById("video-no-poster"));
      if (poster)
        document.getElementById("result-no-poster").innerText = "FAIL : poster was added.";
      else
        document.getElementById("result-no-poster").innerText = "PASS";

      poster = internals.getImageSourceURL(document.getElementById("video-has-poster"));
      if (poster) {
        if (poster == "content/abe.png")
          document.getElementById("result-has-poster").innerText = "PASS";
        else
          document.getElementById("result-has-poster").innerText = "FAIL: poster was changed";
      } else
        document.getElementById("result-has-poster").innerText = "FAIL: Image source is null";

      testRunner.notifyDone();
    }, false);
  }

</script>
</head>
<body>
<pre id="result-no-poster"></pre>
<pre id="result-has-poster"></pre>
<video id="video-no-poster" src="content/test.mp4" preload="none" />
<video id="video-has-poster" src="content/test.mp4" poster="content/abe.png" preload="none" />
</body>
</html>
